<template>
  <div class="custom-content">
    <div
      v-if="
        setting.query !== undefined &&
          setting.query !== null &&
          setting.query.length > 0
      "
      class="custom-header"
    >
      <div
        v-for="(item, index) in setting.query"
        :key="'input-' + index"
        class="header-input"
      >
        <div class="header-input-span">
          <input
            v-if="item.type === 1"
            v-model="form[item.column]"
            placeholder="请输入查询内容"
            @keyup="queryObject"
          >&nbsp;&nbsp;&nbsp;
          <div class="header-input-icon" @click="queryObject">
            <i class="el-icon-search" />
          </div>
        </div>
      </div>
    </div>
    <div class="custom-body">
      <el-scrollbar
        style="width: 100%;height: 100%;overflow-x: hidden;overflow-y: auto"
      >
        <el-empty
          v-if="dataList === null || dataList.length === 0"
          :image-size="100"
        />
        <div v-else class="layout-ui">
          <div
            v-for="(obj, index) in dataList"
            :key="'obj-' + index"
            class="custom-ul-li"
            :loading="loading"
            @click="openEntity(obj)"
          >
            <div class="custom-li-title">
              <span><i class="el-icon-caret-right" /></span>
              {{ obj[column['title']] }}
            </div>
            <div class="custom-li-span">
              {{ obj[column['time']] }}
            </div>
          </div>
        </div>
      </el-scrollbar>
    </div>
  </div>
</template>

<script>
import { more } from '@/mixins/mobile'
export default {
  name: 'AppNewListTempV1',
  mixins: [more({})]
}
</script>

<style lang="scss" scoped>
.custom-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-flow: column nowrap;
}
.custom-header {
  flex: 0 1 auto;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  background-color: #f2f6fc;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
}
.custom-body {
  position: absolute;
  top: 80px;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  overflow: hidden;
  padding: 0 10px;
  box-sizing: border-box;
  background-color: #ffffff;
}
.header-input-span > input {
  width: 100%;
  border: none;
  outline: none;
}
.header-input {
  width: 100%;
  line-height: 40px;
  height: 40px;
  padding: 5px 15px;
  box-sizing: border-box;
  font-size: 13px;
}
.header-input-span {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  background-color: #ffffff;
  padding: 0 20px;
  box-sizing: border-box;
  position: relative;
  line-height: 30px;
  color: #606266;
}
.header-input-icon {
  position: absolute;
  right: 5px;
  top: 0;
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
}
.custom-ul {
  padding-top: 10px;
  box-sizing: border-box;
}
.custom-ul-li {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  .custom-li-title {
    flex: 1 1;
    height: 40px;
    line-height: 40px;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .custom-li-span {
    width: 80px;
    height: 40px;
    line-height: 40px;
    font-size: 0.8rem;
    color: #666666;
    text-align: right;
  }
}
.custom-ul-li:not(:last-child) {
  border-bottom: 1px solid #ebeef5;
}
[class*="el-col-"] {
  float: left;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.el-scrollbar >>> .el-scrollbar__wrap {
  overflow-x: hidden;
  overflow-y: auto;
}
</style>
